package com.baosight.risk.mapper.riwa;

import com.baosight.risk.base.mapper.BaseMapper;
import com.baosight.risk.service.riwa.entity.RiwaRiskWaringTarget;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface RiwaRiskWaringTargetMapper extends BaseMapper<RiwaRiskWaringTarget> {

    List<RiwaRiskWaringTarget> getWaringTargetByRuleId(@Param("warningRuleId") String warningRuleId);

    Integer deleteByWaringId(@Param("warningModelGuid") String warningModelGuid);

    List<RiwaRiskWaringTarget> getByImportIdAndTargetNo(@Param("warningModelGuid") String warningModelGuid,
                                                        @Param("targetNo") String targetNo);

    /**
     * 根据规则ID删除所有规则指标
     * @param warningRuleId 规则ID
     * @return
     */
    Integer deleteByRuleId(@Param("warningRuleId") String warningRuleId);
}